package itheima.chap05;

import java.util.Scanner;

public class RelationOperation {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = 20;
        System.out.print("请输入一个变量b：");
        int b = scanner.nextInt();

        System.out.println(b > a);  // false
        System.out.println(b < a);  //  true
        System.out.println(b >= a); // false
        System.out.println(b <= a); // true
        System.out.println(b == a); // false
        System.out.println(b != a); // true

        // String是引用类型，不能用==比较（引用类型还有Scanner，数组等等）
        String s1 = "hello";
        String s2 = scanner.next();
        System.out.println(s1.equals(s2)); //true
        System.out.println(!s1.equals(s2)); //false
    }
}
